﻿using System;
using Microsoft.Feeds.Interop;

namespace Bonobo.Reader.Feeds
{
    public sealed class FeedItem : BonoboItem
    {
        private IFeedItem _item;

        public String FeedName { get; set; }

        internal FeedItem(IFeedItem item)
        {
            _item = item;
            Title = item.Title;
            Text = item.Description;
            DateTime = item.PubDate;
            IsRead = item.IsRead;
            Url = new Uri(item.Link);
            FeedName = ((IFeed)item.Parent).Name;
        }

        public override void MarkAsRead()
        {
            IsRead = true;
            _item.IsRead = IsRead;
        }

        public override void GetItemCommands()
        {
            throw new NotImplementedException();
        }
    }
}
